home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
gt_power
/
udstat21.zip
/
UDSTATS.DOC
next >
Wrap
Text File
|
1990-05-07
|
15KB
|
347 lines
*************************************
* *
* UDSTATS *
* *
* Version 2.1 *
* *
* GT 15.xx ONLY - LAN AWARE !!!! *
* *
* Tested on a LANtastic Network *
* *
*************************************
A Programme for GT 15.00 Sysops
(Of no use to anyone else)
John Della-Torre
PO Box 169
Eastwood
New South Wales 2122
Sydney, Australia
GT Net/Node: 302/000
The Poet's Dilemma: 61-2-804-6412 (HST Dual)
: 61-2-804-7449 (HST 9600)
Voice: 61-2-804-7516
WARRANY
=======
Use this programme at your own risk. No warranty is given.
I wrote it to help me run my own system and I offer it to others
on the understanding that I am not to be held responsible if it
does not work on or damages your system.
LICENCE and REGISTRATION
========================
No registration is required to use this programme - it is NOT part
of the OZNET suite of programmes.
You may copy and distribute the two files that comprise the
package provided you do not alter any file; distribute the
package using any compression technique you wish.
The package is "Shareware" and the copyright remains with the
author. If you like or use the programme send me a Netmail
message or post an entry in the "GT<>FIDO Gateway and OZ
Companions" conference.
HISTORY
=======
Date Version
May 20, 1989 1.0
May 21, 1989 1.1 - Added the /D option
May 26, 1989 1.2 - Added the /R option
May 27, 1989 1.3 - Added /F and /C and changed /R
June 06, 1989 1.4 - Fixed problem with comma in /R
Recompile needed for Toolkit Change.
June 11, 1989 1.5 - Fixed error where /d option was not
checking /r trigger value.
July 25, 1989 1.6 - Fixed error with > Limit D/L & 0 U/L
Aug 05, 1989 1.7 - Abort if in LAN environment - LAN support
later!
Aug 19, 1989 1.8 - Fixed miscalc of # of /Rs. Increased
# of /Rs from 4 to 5 and /F from 8 to 10
Sep 03, 1989 1.9 - Added LAN support. Tested on LANtastic
Feb 05, 1990 2.0 - Added /N Option and CALLS.BBS count
Changed presentation of information
Errorlevel 2 for Upgrade, 1 for Downgrade
May 05, 1990 2.1 - Fix bug when D/L=0 and U/L>0
PURPOSE
=======
If you run the programme RATIOGEN, you will have a file called
RATIO.BBS which contains the accumulated counts of K-Bytes
uploaded and downloaded for each caller. GT 15.00 contains
fields in the USER.CTL file for K-Bytes uploaded and downloaded,
but historical data is lost if you don't have a way of
initialising those fields. If you've been using RATIOGEN, then
the /S option of this programme will be of use to you.
One function of this programme (via the /S option) is to prime
the GT 15.00 fields with the counts from your RATIO.BBS file.
UDSTATS will read your RATIO.BBS and STORE the upload and download
counts into the GT 15.00 fields.
NOTE VERY WELL: You should only use the /S option ONCE to
initialise GT 15.00's fields. If you run GT 15.00 (Beta09 or
after) then GT will update the fields itself and any execution of
the /S option of UDSTATS will simply OVERWRITE what GT has put
there.
You can use the display (/D) option in your GTLOGON.BAT file to
show a caller his/her upload, download k_counts and down:up ratio
together with a warning message if the ratio exceeds the value you
have specified via the /R option.
The /F option is used to automatically downgrade and upgrade
callers according to the criteria specified in the /R option and
should be used in the GTLOGOFF.BAT.
A UDSTATS.LOG file is created - see "The UDSTATS.LOG File" section
below. All activity is logged to this file, please examine it
regularly.
Please see "How I Use UDSTATS on my SYSTEM" below for further
details.
THE GTPATH ENVIRONMENT VARIABLE
===============================
The programme expects to find the GTPATH environment variable -
if it's not SET, then the programme fails.
THE COMMAND LINE PARAMETERS
===========================
The syntax expected is:
UDSTATS [/S] | [/D] | [/Ral,nn] | [/Fabcd] | [/Cnn] | [/N] | ?
If you provide no parameters, the programme will display a help
message detailing the various options.
You may use the "-" character instead of the "/" if you wish.
The command line options have the following meanings and may be
entered in UPPER or lower case:
/S
STORE the values from RATIO.BBS in the appropriate GT 15.00
fields. The file RATIO.BBS is expected in the directory specified
by the GTPATH environment variable.
USE THIS OPTION ONCE TO INITIALISE GT 15.00'S FIELDS FROM
RATIO.BBS - THEN FORGET IT.
/C
Give this caller Netmail Credits REGARDLESS of his/her class.
Specify this as /Cnnn. On my system I choose to give everyone
(via the GTLOGOFF.BAT file) 5 Netmail credits. Since new callers
are not given access to the Netmail area until I verify them, it
doesn't matter that they have Netmail credits - in fact this
technique allows them to enter Netmail as soon as I upgrade them.
/D
DISPLAY and FORCE (see below) are mutually exclusive - only one is
allowed.
DISPLAY (via the GTLOGON.BAT) a caller's download, upload and
ratio counts. The counts displayed by this option come from the
GT fields.
/Ral,nn
A maximum of five /Rs are allowed.
The RATIO details. Are you ready for this? You need to specify
THREE things here:
(a) The Access class that (l) and (nn) below apply to.
(l) The Download Limit in 1000k, ie the amount of data you
allow your callers to take BEFORE ratio monitoring
gets triggered. For example specify 1000k as 1 and 2000k
as 2 etc.
(nn) The Down:Up ratio for this access level.
For example, say you had an access level of R (for Regulars) and
that you allow 1000k to be downloaded before a ratio monitoring of
10:1 takes place. Furthermore, assume that you also had a P (for
Privilege) access class where you allow 3000k before a Down:Up
ratio of 15:1 applies. You would, to DISPLAY the details to you
callers, invoke UDSTATS as follows:
UDSTATS /D /rR1,10 /rP3,15 <=<= Place in GTLOGON.BAT
If the caller was access level R, then as well as the Download,
Upload K-counts and the Down:Up ratio, he/she would also be
presented with the message:
"Download authority is lost after 1000k is taken and your ratio
exceeds 10:1".
If you DON'T specify a /R option for certain access levels on your
system, then you will effectively exempt those access levels from
RATIO monitoring. If your caller has an access level that you
have not enabled via the multiple /Rs, then he/she will be
presented with his/her statistics and the message:
"You are exempt from ratio monitoring".
NB => The consequence of exempting callers by _not_ having a /R for
their access level means that you really need the /R for the
access level to which the caller is downgraded as well. So, the
above example should really say: (assuming S annd Q are the
"downgraded levels")
UDSTATS /D /rR1,10 /rP3,15 /rS1,10 /rQ3,15
/Fftftftft
FORCE and DISPLAY are mutually exclusive - you can only have one
of them. The "f" means "from" and the "t" means "to"
FORCE a downgrade (via the GTLOGOFF.BAT) from access class f to
access class t when the criteria in the /R option has been
satisfied. The trick here is to set up an access class in
GTPASSWD.BBS which does NOT have download authority but is in all
other respects just like the access level which does have the
download authority. For example if you wished to automatically
downgrade your R (Regular) callers to S and your P (Privileged)
callers to Q you would specify:
UDSTATS /rR1,10 /rP3,15 /fRSPQ
Automatic upgrade takes place when the caller uploads some files
and brings his/her ratio below that specified in the /R option.
A maximum of five pairs of access classes are allowed.
/N
Use this if you _don't_ want the CALLS.BBS file incremented. See
CALLS.BBS below.
? Presents online help.
HOW THE PROGRAMME IS USED on MY SYSTEM
======================================
First:
======
I ran RATIOGEN for the last time last night to ensure that the
RATIO.BBS file was up to date. I then ran the small BAT file
shown below to prime the GT 15.00 upload_k and download_k fields.
C:
CD \GT
RATIOGEN /EGT:STO:NMAIL
COPY USER.CTL USEROLD.CTL <=<=<= Better to be safe ... etc
COPY USER.IDX USEROLD.IDX <=<=<= Same as above
UDSTATS /S
Now that the GT fields are primed, I WILL NEVER AGAIN USE THE /S
Option. It would not be very wise to continue priming the GT
15.00 fields with the /S option now that GT is itself updating
those fields - right?
Secondly:
=========
In my GTLOGON.BAT file I invoke (via DOORWAY) UDSTATS as follows:
DOORWAY /O: .. Doorway parms .. /P:UDSTATS /D /rR1,10 /rP3,15
This provides the caller with his Download and Upload kbyte counts
together with the Down:Up ratio. If the caller is access level R
or P he/she is told that ratio monitoring commences after 1000k
and 3000k has been downloaded and the ratio exceeds 10:1 and 15:1
respectively.
If the caller IS NOT R or P, then the statistics are still
provided, but an additional message "You are exempt from ratio
ratio monitoring" is also provided.
Thirdly:
========
In my GTLOGOFF.BAT file, I invoke the /F option as follows:
UDSTATS /rR1,10 /rP3,15 /fRSPQ /C5 (This is NOT run via DOORWAY)
The /C5 gives EVERY caller 5 Netmail Credits regardless of his/her
class.
THE UDSTATS.LOG FILE
====================
UDSTATS produces a UDSTATS.LOG file either in the GTPATH
directory or the directory specified in the LO entry in GT.CNF.
If the LOG file does not exists, UDSTATS will create it, if it
does exist UDSTATS will append to it.
It shows activity generated from the /S and /F options.
If you have P & M Software's "Developer's Toolkit", then you can
use the SYSOP programme to verify that the GT fields have the
correct values in them after you've run UDSTATS with the /S
option. Sysop Tools will also show you the stats.
THE CALLS.BBS FILE
==================
The CALLS.BBS file is a file created by one of Stephen's
programmes and it indicates the number of callers you've had to
your system. It's a one line ASCII file with the count in it.
UDSTATS will increment this count by one if the /N option _IS NOT_
present.
If you wish to run UDSTATS in a DOOR as well as in the GTLOGON.BAT
then you'd better place a /N along with the /D in the GTDOORx.BAT
file, otherwise the CALLS.BBS file will be incremented _AGAIN_.
ERRORLEVELS
===========
If a caller is Upgraded then an errorlevel of 2 is set; if
downgraded an errorlevel of 1 is set.
You could use TEXT2MSG with these errorlevels to send the caller a
predefined private message depending on his access level changes.
FINALLY (This ONLY applies if you're going from 14.03 to 15.00)
===============================================================
Remember, use the /S option ONCE ONLY to prime the fields with the
RATIO.BBS file. If you have not been using RATIOGEN, then the /S
option is OF NO USE TO YOU.
Please report any problems in the "GT<>FIDO and Oz Companions"
conference (E10/053).
Regards, John
+++++++++++++++++++++++ End of Document +++++++++++++++++++++++